
var app = getApp();

Page({
    data: {
        user_id: 0,
        TabCur: 0,
        follows: [],
        follow_count: 0,
    },
    onLoad(options) {
        const user_id = options.user_id
        this.setData({
            user_id: user_id
        })
        this.followAndList(user_id)
    },
    onShow() {

    },

    tabSelect(e) {
        this.setData({
            TabCur: e.currentTarget.dataset.id
        })
    },

    followAndList: function(user_id) {

        app.core('get', 'follow/all', {user_id: user_id}, (res) => {
            this.setData({
                follows: res.data.follows,
                follow_count: res.data.count,
            })
        })
    }
})
